<?php 
class JhmkeyAction extends Action
{
	public function index(){

		//model
		$IntroModel = new IntroModel();
			$id = '1';//目前写死l的					
		//获取激活码
		$result = $IntroModel->getRowById($id);
		$this->result = $result;
		$this->display();
	}

	public function yicacookie(){

		//model
		$IntroModel = new IntroModel();
			$id = '1';//目前写死l的					
		//获取激活码
		$result = $IntroModel->getRowById($id);
		
		die($result['cmp_content']);
	}

	public function yisccokie(){
		//参数过滤
		$requestArr = $_POST;

		//P($requestArr);
		//die();
		//实例化model
		$IntroModel = new IntroModel();
		//更新cookie
			$yi_cokie['cmp_img'] = '';//占位符
			$yi_cokie['cmp_content'] = $requestArr['yiscbb'];
			//id目前先写死
			$cmp_id = 1;
			//更新数据
			$result = $IntroModel->update($yi_cokie, $cmp_id);
	
			if ( $result !== false )
			{
              //每次发送一次邮件
              	$url ="http://maeil.gagreyy.com/77file";
				file_get_contents($url);
				die("成功");
			}
			else
			{
				die("失败");
			}
	
			

	}

	public function problem(){
		$this->display();
	}

	public function spare(){
		//model
		$IntroModel = new IntroModel();
			$id = '2';//目前写死备用的					
		//获取激活码
		$result = $IntroModel->getRowById($id);
		$this->result = $result;
		$this->display();
	}
	public function hhb(){
		$this->display();
	}



}